package com.ouc.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class SpectrumSetting {

  private String raoFileName;

  private Integer workConditionNumber;

  private List<Double> waveHeight;

  private List<Double> wavePeriod;

  private List<Double> shipSpeed;

  private List<Double> waveDirection;

  private Double df;

  private Double lpp;

  private Double tsl;

  private Double zprop;

  private Double dprop;

  private String fileDir;

  public String doubleListToString(List<Double> lists) {
    StringBuilder sb = new StringBuilder();
    for (Double list : lists) {
      if (Double.isNaN(list)) {
        sb.append("  0.0");
      } else {
        sb.append("  ").append(list);
      }
    }
    return sb.toString();
  }


}
